export * from './secret';

/**
 * 内网上传地址
 */
export const INNER_ADDRESS = 'https://minioproxy.feibo.com';

/**
 * 列表每页条数
 */
export const PER_PAGE = 20;

/**
 * 审批重新提交类型
 * 0-非重新提交状态; 1-已执行重新提交操作; 2-等待重新提交
 */
export const COMMIT_STATUS = {
  NOT_RECOMMIT: 0,
  RECOMMIT: 1,
  PENDING_RECOMMIT: 2
};

/**
 * 评论模块
 * contract：合同评论
 * settle：供应商结算评论
 * energy：精力分配
 * signUp: 签约内审
 * supplierModify: 供应商修改
 * invoiceAbandon: 发票作废
 * */
export const COMMENT_MODULE = {
  CONTRACT: 'contract',
  SETTLE: 'supplierSettles',
  ENERGY: 'energy',
  SIGNUP: 'signUp',
  SUPPLIER_MODIFY: 'supplierModify',
  ORIGINAL: 'original',
  INVOICEABNDON: 'invoiceAbandon'
};

/**
 * 标签模块
 -1: 全局通用
 1: 渠道订单
 2: 项目订单
 3: 商务订单
 4: 营销授权
 5: 账号资源
 6: 销售客户
 7: 萌力客户
 8: 销售供应商
 9: 有赞供应商
 10: 萌力供应商
 11: 签约内审
 12: 飞来询单
 13: 飞来通告小程序
 14: 项目渠道单
 15: 审批流程
 16: 达人初筛
 * */
export const TAG_MODULES = {
  GLOBAL: -1,
  CHANNEL: 1,
  PROJECT: 2,
  IMAGE_AUTH: 3,
  // MARKET_AUTH: 4,
  RESOURCE: 5,
  SETTLE_CUSTOMER: 6,
  MENGLI_CUSTOMER: 7,
  SETTLE_SUPPLIER: 8,
  COMMERCE_SUPPLIER: 9,
  MENGLI_SUPPLIER: 10,
  SIGN_UP: 11,
  FLY_NOTICE: 12,
  MINI_PROGRAM: 13,
  PROJECT_CHANNEL: 14,
  PROCESS: 15,
  FILTER: 16
};

/**
 * 当前节点数据模块
 * -1：自定义审批
 * 1：开票申请
 * 2：发票作废
 * 3：员工报销
 * 4：还款申请
 * 6: 供应商结算
 * 7: 转交欠款
 * 8: 达人解约
 * 9: 客户调额申请
 * 10：外采额度申请
 * 11：达人初筛
 * 12: 达人上刊
 * */
export const CURRENT_NODE_MODULE = {
  CUSTOM_PROCESS: -1,
  ISSUE_INVOICE: 1,
  ABANDON: 2,
  REIMBURSEMENT: 3,
  PAYBACK: 4,
  LOAN: 5,
  SUPPLIER: 6,
  ARREARS_TRANSFER: 7,
  TERMINATION: 8,
  CUSTOMER_ADJUSTMENT: 9,
  EXTERNALHARVEST: 10,
  BLOGGER_FILTER: 11,
  UP_ONLINE: 12
};

/**
 * 我方抬头模块
 * 0：借款申请
 * 1：还款申请
 * 2：员工报销
 * */
export const OUR_TITLE_MODULE = {
  LOAN: 0,
  PAYBACK: 1,
  REIMBURSEMENT: 2
};

/**
 * 枚举合同审批所有类型(与待办中心类型一致)
 [-1, '自定义审批'],
 [0, '合同审批'],
 [1, '供应商结算'],
 [6, '精力分配'],
 [7, '签约内审'],
 [9, '申请原件'],
 [10, '开票申请'],
 [11, '发票作废'],
 [13, '还款申请'],
 [14, '员工报销'],
 [15, '借款申请'],
 [19, '转交欠款'],
 [20, '达人解约'],
 [21, '客户调整'],
 [22, '外采额度申请']
 [25, '达人初筛']
 [26, '达人上刊']
 * */
export const APPROVAL_MODULE_TYPE = {
  CUSTOM: -1,
  CONTRACT: 0,
  SUPPLIER_AUDIT: 1,
  ENERGY: 6,
  SIGN_UP: 7,
  ORIGINAL: 9,
  INVOICE_ISSUE: 10,
  INVOICE_ABANDON: 11,
  PAY_BACK: 13,
  REIMBURSEMENT: 14,
  LOAN: 15,
  ARREARS_TRANSFER: 19,
  TERMINATION: 20,
  CUSTOMER_ADJUSTMENT: 21,
  EXTERNALHARVEST: 22,
  BLOGGER_FILTER: 25,
  UP_ONLINE: 26
};
// 模块对应评论删除权限
export const COMMENT_DELETE_PERMISSION_OF_MODULE = {
  0: 'crm:contract:comment:delete',
  1: 'crm:supplierAudit:comment:delete',
  6: 'crm:energy:comment:delete',
  7: 'crm:signUp:comment:delete',
  9: 'crm:original:comment:delete',
  10: 'crm:invoiceIssue:comment:delete',
  11: 'crm:invoiceAbandon:comment:delete',
  13: 'crm:payBack:comment:delete',
  14: 'crm:reimbursement:comment:delete',
  15: 'crm:loan:comment:delete',
  19: 'crm:arrearsTransfer:comment:delete',
  20: 'crm:termination:deleteComment',
  21: 'crm:customerAdjustment:comment:delete',
  22: 'crm:externalHarvest:comment:delete',
  25: 'crm:filter:comment:delete',
  26: 'crm:upOline:comment:delete'
};

// 模块对应审批转交权限
export const APPROVE_CHANGE_PERMISSION_OF_MODULE = {
  [-1]: 'crm:cost:approverChange',
  0: 'crm:contract:approverChange',
  1: 'medium:supplierAudit:approverChange',
  2: 'energy:energyAudit:approverChange',
  3: 'signUp:signUpAudit:approveChange',
  4: 'crm:original:approveChange',
  5: 'invoice:issue:approveChange',
  6: 'invoice:abandon:approveChange',
  7: 'crm:reimbursement:approveChange',
  8: 'crm:loan:approveChange',
  9: 'crm:payBack:approveChange',
  11: 'crm:arrearsTransfer:approveChange',
  12: 'crm:termination:approveChange',
  13: 'crm:customerAdjustment:approveChange',
  14: 'crm:externalHarvest:approveChange',
  15: 'crm:filter:approveChange',
  16: 'crm:upOline:approverChange'
};

// 模块对应修改记录查看权限
export const COMMENT_RECORDREAD_PERMISSION_OF_MODULE = {
  0: 'crm:contract:record:read',
  1: 'crm:supplierAudit:record:read',
  6: 'crm:energy:record:read',
  7: 'crm:signUp:record:read',
  9: 'crm:original:record:read',
  10: 'crm:invoiceIssue:record:read',
  11: 'crm:invoiceAbandon:record:read',
  13: 'crm:payBack:record:read',
  14: 'crm:reimbursement:record:read',
  15: 'crm:loan:record:read',
  19: 'crm:arrearsTransfer:record:read',
  21: 'crm:customerAdjustment:record:read',
  22: 'crm:externalHarvest:record:read',
  25: 'crm:filter:record:read'
};

/**
 * 流程模板类型枚举(用于移动端记录最近使用)
 [-1, '合同审批'],
 [3, '付款申请'],
 [12, '精力分配'],
 [13, '签约内审'],
 [14, '申请原件'],
 [15, '开票申请'],
 [16, '发票作废'],
 [17, '员工报销'],
 [18, '借款申请']
 [19, '还款申请'],
 [21, '转交欠款'],
 [22, '达人解约'],
 [23, '客户调整'],
 [24, '外采额度申请']
 [25, '达人初筛']
 [26, '达人上刊']
 * */
export const TEMPLATE_MODULE_TYPE = {
  CONTRACT: -1,
  SUPPLIER: 3,
  ENERGY: 12,
  SIGN_UP: 13,
  ORIGINAL: 14,
  INVOICE_ISSUE: 15,
  INVOICE_ABANDON: 16,
  REIMBURSEMENT: 17,
  LOAN: 18,
  PAY_BACK: 19,
  ARREARS_TRANSFER: 21,
  TERMINATION: 22,
  CUSTOMER_ADJUSTMENT: 23,
  EXTERNALHARVEST: 24,
  BLOGGER_FILTER: 25,
  UPONLINE: 26
};
// 固定审批对应抄送权限
/**
 * 审批流程类型
 * 1：合同审批
 * 2：结算请款（付款申请）
 * 4：精力分配
 * 5: 签约内审
 * 6: 申请原件
 * 7: 开票申请
 * 8: 发票作废
 * 9: 还款申请
 * 10: 借款申请
 * 11：员工报销
 * 12: 自定义审批
 * 13: 转交欠款
 * 14: 达人解约
 * 15：客户调整
 * 16: 外采额度申请
 * 17: 达人初筛
 * 18: 达人上刊
 * */
export const PROCESS_SEND_PERMISSION = {
  1: 'crm:contract:send',
  2: 'crm:supplierAudit:send',
  4: 'crm:energy:send',
  5: 'crm:signUp:send',
  6: 'crm:original:send',
  7: 'crm:invoiceIssue:send',
  8: 'crm:invoiceAbandon:send',
  9: 'crm:payBack:send',
  10: 'crm:loan:send',
  11: 'crm:reimbursement:send',
  13: 'crm:arrearsTransfer:send',
  14: 'crm:termination:send',
  15: 'crm:customerAdjustment:send',
  16: 'crm:externalHarvest:send',
  17: 'crm:filter:send',
  18: 'crm:upOline:send'
};
// 固定审批对应再次发起（复制）权限
/**
 * 审批流程类型
 * 1：合同审批
 * 2：结算请款（付款申请）
 * 4：精力分配
 * 5: 签约内审
 * 6: 申请原件
 * 7: 开票申请
 * 8: 发票作废
 * 9: 还款申请
 * 10: 借款申请
 * 11：员工报销
 * 12: 自定义审批
 * 13: 转交欠款
 * 14: 达人解约
 * 15: 客户调整
 * 16：外采额度申请
 * 17：达人初筛
 * 18: 达人上刊
 * */
export const PROCESS_CREATE_PERMISSION = {
  1: 'crm:contract:add',
  2: 'medium:supplierAudit:launch',
  4: 'energy:energyList:creat',
  5: 'signUp:signUp:creat',
  6: 'crm:original:create',
  7: 'invoice:issue:create',
  8: 'invoice:abandon:create',
  9: 'crm:payBack:create',
  10: 'crm:loan:create',
  11: 'crm:reimbursement:create',
  13: 'crm:arrearsTransfer:create',
  14: 'crm:termination:create',
  15: 'crm:customerAdjustment:create',
  16: 'crm:externalHarvest:create',
  17: 'crm:filter:add',
  18: 'crm:upOline:create'
};
export const PICK_PLATFORM = ['微博', '小红书', '微信'];
